unit About;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, StdCtrls;

type
  TAboutF = class(TForm)
    Image1: TImage;
    Timer1: TTimer;
    Label1: TLabel;
    procedure FormCreate(Sender: TObject);
    procedure Label1Click(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
    procedure Image1Click(Sender: TObject);
  public
    class function Execute(timer: boolean): boolean;
  end;

var
  AboutF: TAboutF;

implementation

uses Main;

{$R *.dfm}

class function TAboutF.Execute(timer: boolean): boolean;
begin
  with TAboutF.Create(nil) do
  try
    if timer then
      Timer1.Enabled := true;

    Result := ShowModal = mrOk;
  finally
    Free;
  end;
end;

procedure TAboutF.FormCreate(Sender: TObject);
begin
  Label1.Caption := 'Version ' + VER;
end;

procedure TAboutF.Image1Click(Sender: TObject);
begin
  ModalResult := mrOk;
end;

procedure TAboutF.Label1Click(Sender: TObject);
begin
  ModalResult := mrOk;
end;

procedure TAboutF.Timer1Timer(Sender: TObject);
begin
  ModalResult := mrOk;
end;

end.
